package com.hd.determine.config.properties;

import com.hd.determine.core.utils.StaticPropUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * Socket自动配置
 */
@Configuration
public class StaticConfig {

    private static final Logger LOGGER = LoggerFactory.getLogger(StaticConfig.class);


    @Value("${alarm.show-log}")
    private Boolean showLog;

    @Bean
    public int initSocketConfig() {
        StaticPropUtil.setShowAlarmLog(showLog);
        LOGGER.info("[static] 静态配置加载完毕");
        return 0;
    }

}
